package com.ysq.www.api.front.controller;


import com.ysq.www.api.front.service.IActivityApplyService;
import com.ysq.www.common.annotation.AuthToken;
import com.ysq.www.common.result.ResultMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 活动报名表 前端控制器
 * </p>
 *
 * @author dql
 * @since 2020-08-08
 */
@Slf4j
@RestController
@RequestMapping("/front/activityApply")
public class ActivityApplyController {

    @Autowired
    private IActivityApplyService applyService;

    @GetMapping("/apply")
    @AuthToken
    public ResultMsg apply(Integer userId,Integer activityId){
        applyService.add(userId,activityId);
        return ResultMsg.SUCCESS.setNewMsg("活动报名成功");
    }


}
